/**
 * OSS is a Open Service Container which gives the leverage of building the Desktop and Web
 * Application. * Copyright (C) 2008-2009  Ponraj Sutanthiramani
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Or5e Open Source Community
 * Navigator Bldg, ITPL, Bangalore, India.
 */

package org.or5e.api.calendar;

import java.util.Calendar;

/**
 * @author SG0206527
 */
public class CalendarEntry {
    public enum Priority {HIGH, MEDIUM, LOW};
    private String _subject;
    private Calendar _startDateTime;
    private Calendar _endDateTime;
    private Boolean _alldayevent;
    private Boolean _reminderonoff;
    private Calendar _reminderDateTime;
    private String _meetingOrganizer;
    private String[] _requiredAttendees;
    private String[] _optionalAttendees;
    private String _meetingResources;
    private String _billingInformation;
    private String _categories;
    private String _description;
    private String _location;
    private String _mileage;
    private Priority _priority;
    private Boolean _private;
    private String _sensitivity;
    private Integer _showTimeAs;

    public Boolean getAlldayevent() {
        return _alldayevent;
    }

    public void setAlldayevent(Boolean _alldayevent) {
        this._alldayevent = _alldayevent;
    }

    public String getBillingInformation() {
        return _billingInformation;
    }

    public void setBillingInformation(String _billingInformation) {
        this._billingInformation = _billingInformation;
    }

    public String getCategories() {
        return _categories;
    }

    public void setCategories(String _categories) {
        this._categories = _categories;
    }

    public String getDescription() {
        return _description;
    }

    public void setDescription(String _description) {
        this._description = _description;
    }

    public Calendar getEndDateTime() {
        return _endDateTime;
    }

    public void setEndDateTime(Calendar _endDateTime) {
        this._endDateTime = _endDateTime;
    }

    public String getLocation() {
        return _location;
    }

    public void setLocation(String _location) {
        this._location = _location;
    }

    public String getMeetingOrganizer() {
        return _meetingOrganizer;
    }

    public void setMeetingOrganizer(String _meetingOrganizer) {
        this._meetingOrganizer = _meetingOrganizer;
    }

    public String getMeetingResources() {
        return _meetingResources;
    }

    public void setMeetingResources(String _meetingResources) {
        this._meetingResources = _meetingResources;
    }

    public String getMileage() {
        return _mileage;
    }

    public void setMileage(String _mileage) {
        this._mileage = _mileage;
    }

    public String[] getOptionalAttendees() {
        return _optionalAttendees;
    }

    public void setOptionalAttendees(String[] _optionalAttendees) {
        this._optionalAttendees = _optionalAttendees;
    }

    public Priority getPriority() {
        return _priority;
    }

    public void setPriority(Priority _priority) {
        this._priority = _priority;
    }

    public Boolean getPrivate() {
        return _private;
    }

    public void setPrivate(Boolean _private) {
        this._private = _private;
    }

    public Calendar getReminderDateTime() {
        return _reminderDateTime;
    }

    public void setReminderDateTime(Calendar _reminderDateTime) {
        this._reminderDateTime = _reminderDateTime;
    }

    public Boolean getReminderonoff() {
        return _reminderonoff;
    }

    public void setReminderonoff(Boolean _reminderonoff) {
        this._reminderonoff = _reminderonoff;
    }

    public String[] getRequiredAttendees() {
        return _requiredAttendees;
    }

    public void setRequiredAttendees(String[] _requiredAttendees) {
        this._requiredAttendees = _requiredAttendees;
    }

    public String getSensitivity() {
        return _sensitivity;
    }

    public void setSensitivity(String _sensitivity) {
        this._sensitivity = _sensitivity;
    }

    public Integer getShowTimeAs() {
        return _showTimeAs;
    }

    public void setShowTimeAs(Integer _showTimeAs) {
        this._showTimeAs = _showTimeAs;
    }

    public Calendar getStartDateTime() {
        return _startDateTime;
    }

    public void setStartDateTime(Calendar _startDateTime) {
        this._startDateTime = _startDateTime;
    }

    public String getSubject() {
        return _subject;
    }

    public void setSubject(String _subject) {
        this._subject = _subject;
    }

    @Override
    public boolean equals(Object obj) {
        CalendarEntry entry = (CalendarEntry)obj;
        if(     this._subject.equals(entry.getSubject()) &&
                this._startDateTime.equals(entry.getStartDateTime()) &&
                this._endDateTime.equals(entry.getEndDateTime())
           ) {
            return true;
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 89 * hash + (this._subject != null ? this._subject.hashCode() : 0);
        hash = 89 * hash + (this._startDateTime != null ? this._startDateTime.hashCode() : 0);
        hash = 89 * hash + (this._endDateTime != null ? this._endDateTime.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return this.getSubject();
    }
}